//
//  BbtContents.h
//  Constellation2
//
//  Created by geng on 15-3-10.
//  Copyright (c) 2015年 卓邮. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <QuartzCore/QuartzCore.h>
#import "UIImageExt.h"
#import "Commend.h"
#import "UIViewExt.h"
#import "GolbalManager.h"
#import "UIImageView+WebCache.h"
#import "UIButton+WebCache.h"
#import "MBProgressHUD.h"
#import "OASocketMethed.h"
#import "OANetPublic.h"
#import "OAIpdataBase.h"
//通知

//坐标

//默认图片

//TODO:播报默认图

//启动key

//useview


#define APPDELEGATE  (AppDelegate *)[[UIApplication sharedApplication] delegate]

//判断是否是iPhone4
#define isIPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
//判断是否是iPhone5
#define isIPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
//是否iPhone6
#define iPhone6 ([UIScreen instancesRespondToSelector:@selector(nativeBounds)] ? CGSizeEqualToSize(CGSizeMake(375*2, 667*2),[[UIScreen mainScreen] nativeBounds].size) : NO)

//是否iPhone6plus
#define iPhone6plus ([UIScreen instancesRespondToSelector:@selector(nativeBounds)] ? CGSizeEqualToSize(CGSizeMake(414.000000*3, 736.000000*3),[[UIScreen mainScreen] currentMode].size) : NO)


//判断系统

#define IOS7 ([[[UIDevice currentDevice]systemVersion] floatValue] >= 7.0?YES:NO)
#define IOS8 ([[[UIDevice currentDevice]systemVersion] floatValue] >= 8.0?YES:NO)

//判断是否是PAD
#define isIPad ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad?YES:NO)


#define SCREEN_HEIGHT              ([[[UIDevice currentDevice]systemVersion] floatValue] >= 7.0?[[UIScreen mainScreen] bounds].size.height :[[UIScreen mainScreen] bounds].size.height-20)
#define SCREEN_WIDTH                [[UIScreen mainScreen] bounds].size.width

#define     RESIZE_UI(float)  ((float)/375.0f*SCREEN_WIDTH)
#define   RESIZE_FRAME(frame) CGRectMake(RESIZE_UI (frame.origin.x),RESIZE_UI (frame.origin.y),RESIZE_UI (frame.size.width),RESIZE_UI (frame.size.height))
#define     HEADER_HEIGHT                (IOS7?64:44)
#define     FOOTER_HEIGHT               49


#pragma mark - 字体
#define FONT_6  [UIFont systemFontOfSize: 6.0]
#define FONT_8  [UIFont systemFontOfSize: 8.0]
#define FONT_BOLD_8 [UIFont boldSystemFontOfSize: 8.0]
#define FONT_9 [UIFont systemFontOfSize: 9.0]
#define FONT_BOLD_9 [UIFont boldSystemFontOfSize: 9.0]
#define FONT_10 [UIFont systemFontOfSize: 10.0]
#define FONT_11 [UIFont systemFontOfSize: 11.0]

#define FONT_BOLD_10 [UIFont boldSystemFontOfSize: 10.0]
#define FONT_12 [UIFont systemFontOfSize: 12.0]
#define FONT_13 [UIFont systemFontOfSize: 13.0]
#define FONT_14 [UIFont systemFontOfSize: 14.0]
#define FONT_15 [UIFont systemFontOfSize: 15.0]
#define FONT_BOLD_14 [UIFont boldSystemFontOfSize: 14.0]
#define FONT_BOLD_13 [UIFont boldSystemFontOfSize: 13.0]
#define FONT_BOLD_12 [UIFont boldSystemFontOfSize: 12.0]
#define FONT_BOLD_11 [UIFont boldSystemFontOfSize: 11.5]
#define FONT_16 [UIFont systemFontOfSize: 16.0]
#define FONT_ALL_15_3   [UIFont systemFontOfSize: 15.3]
#define FONT_PIng_14_5   [UIFont systemFontOfSize: 14.3]
#define FONT_BOLD_16 [UIFont boldSystemFontOfSize: 16.0]
#define FONT_BOLD_15 [UIFont boldSystemFontOfSize: 15.0]
#define FONT_BOLD_17 [UIFont boldSystemFontOfSize: 17.0]
#define FONT_18 [UIFont systemFontOfSize: 18.0]
#define FONT_BOLD_18 [UIFont boldSystemFontOfSize: 18.0]
#define FONT_20 [UIFont systemFontOfSize: 20.0]
#define FONT_BOLD_20 [UIFont boldSystemFontOfSize:20.0]
#define FONT_22 [UIFont systemFontOfSize: 22.0]

#define FONT_BOLD_22 [UIFont boldSystemFontOfSize:22.0]
#define FONT_BOLD_24 [UIFont boldSystemFontOfSize:24.0]
#define FONT_BOLD_26 [UIFont boldSystemFontOfSize:26.0]
#define FONT_BOLD_30 [UIFont boldSystemFontOfSize:30.0]
#define FONT_30 [UIFont systemFontOfSize: 30.0]
#define FONT_52 [UIFont systemFontOfSize: 52.0]


//颜色
#pragma mark - 颜色
#define  BLUE_COLOR     RGBColor(40, 119, 193, 1)
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

#define RGBColor(r,g,b,l) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:l]

#define BACK_DATA_SUCCESS   [[result objectForKey:@"Code"]intValue]==0
#define WEBFIALED     @"网络连接失败"
#define PASE_SIZE     10     //每页 数量
#define TIME_OUT_TIME_INTERVAL   20   //请求时间
